package de.tabuma.pm.gadget.entity;

import javax.jdo.*;
import javax.jdo.annotations.*;

/**
 *
 * @author alefen
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Gadget {
    public Gadget() {
        this.navMode = 0;
    }
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    Long id;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }

    @Persistent
    String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    @Persistent
    int projectId;
    public int getProjectId() {
        return projectId;
    }
    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    @Persistent
    int navMode = 0;
    public int getNavMode() {
        return navMode;
    }
    public void setNavMode(int navMode) {
        this.navMode = navMode;
    }

    @Persistent
    int navModeElementId;
    public int getNavModeElementId() {
        return navModeElementId;
    }
    public void setNavModeElementId(int navModeElementId) {
        this.navModeElementId = navModeElementId;
    }

    @Persistent
    Integer updateTime;
    public Integer getUpdateTime() {
        if(this.updateTime==null) {
            return new Integer(0);
        }
        return this.updateTime;
    }
    public void setUpdateTime(Integer updateTime) {
        this.updateTime = new Integer(updateTime);
    }
}
